import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createApp } from 'vue'
// import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// banner
// ele-plus 国际化
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

// svg 插件
import 'virtual:svg-icons-register'

// css import
import 'tailwindcss/tailwind.css'

import globalPlugins from '@/plugins'
import { banner } from '@/plugins/banner.ts'


import App from './App.vue'
import router from './router'
import './style.css'
// import pinia from '@/store'
import { setupStore } from '@/store'

import '@/permission'

// 1.1 append const app =
const app = createApp(App);
    // .mount('#app')
app.use(ElementPlus, {
    locale: zhCn,
})

// 1.2 add other component
// const pinia = createPinia();
setupStore(app);

app.use(globalPlugins);
app.use(banner);
app.use(router);
// app.use(pinia)
app.use(ElementPlus);
// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//     app.component(key, component)
// }
  
app.mount('#app')

console.log('current env is:', import.meta.env)